<jsp:directive.page contentType="text/html;charset=utf-8" />
<%@ include file="/taglibs.jsp" %>

<head>
<meta name="decorator" content="singleColumn">
<title>iobike - forgot password</title>
</head>
<body>
  <div class='single_column_content small'>
  <h1>Change your password</h1>
  <p>Change your password by filling out the form below.</p>
  <form id="forgotPasswordform" action="${ctx}/user!resetPassword.action" validate="true"  method="post">
	<s:hidden name="user.id"></s:hidden>
	<s:hidden name="user.resetPasswordToken"></s:hidden>
    <div class="input password optional"><label class="password optional" for="user_password"> Password</label>
    	<input class="password required" id="user_password" name="user.password" size="50" type="password" />
    	<span class="help-block">Must be at least six characters long</span></div>
    <div class="input password optional">
    	<label class="password optional" for="user_password_confirmation"> Password Confirmation</label>
    	<input class="password required" id="user_password_confirmation" name="user.confirmPassword" size="50" type="password" /></div>
    <p><input name="commit" type="submit" class="btn btn-primary" value="Change my password" /></p>
  </form>
  <div class='clearfix'></div>
  </div>


<script type="text/javascript">

$(document).ready(function() {
    // validate signup form on keyup and submit 
    var validator = $("#forgotPasswordform").validate({ 
        rules: { 
		    'user.password': { minlength: 6},
		    'user.confirmPassword': {equalTo:"#user_password"}
        }, 
        onkeyup: false,
    });
    document.all.user_password.focus();
}); 
</script>
</body>
